private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
private->impl_window = private;
- /* Note: This needs to be reworked for multi-screen support. */
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (_gdk_root)->impl);
- rect = [[NSScreen mainScreen] frame];
+ /* The size of the root window should be the same as the size of
+ * the screen it belongs to.
+ *
+ * FIXME: Of course this needs to be updated when you change the monitor
+ * configuration (add another one, remove one, etc).
+ */
private->x = 0;
private->y = 0;
private->abs_x = 0;
private->abs_y = 0;
- private->width = rect.size.width;
- private->height = rect.size.height;
+ private->width = gdk_screen_get_width (_gdk_screen);
+ private->height = gdk_screen_get_height (_gdk_screen);
private->state = 0; /* We don't want GDK_WINDOW_STATE_WITHDRAWN here */
private->window_type = GDK_WINDOW_ROOT;